import Vue from "vue"
import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
	state:{
		cityName:"定位中..."
	},
	mutations:{
		//更新首页定位信息
		updataCity(state,config){
			Object.keys(config).map((item,key)=>{
				state[item] = config[item]
			})
		},
		changeCityName(state,cityName){
			state.cityName = cityName
		}
	},
	actions:{}
})

export default store